﻿using ERP.Workflow.Designer.Domain;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using WorkflowEngine.Entitys;

namespace WorkflowEngine.EntityFrameworkCore;


[ConnectionStringName(WorkflowEngineConsts.ConnectionStringName)]
public class WorkflowEngineDbContext :  AbpDbContext<WorkflowEngineDbContext>, IWorkflowEngineDbContext

{
    public virtual DbSet<ActivityInstance> ActivityInstance { get; set; }
    public virtual DbSet<ActivityTaskInstance> ActivityTaskInstance { get; set; }
    public virtual DbSet<BillCode> BillCode { get; set; }
    public virtual DbSet<ObjectApp> ObjectApp { get; set; }
    public virtual DbSet<WorkflowApp> WorkflowApp { get; set; }
    public virtual DbSet<WorkflowInstance> WorkflowInstance { get; set; }
    public virtual DbSet<WorkTask> WorkTask { get; set; }
    

    public WorkflowEngineDbContext(DbContextOptions<WorkflowEngineDbContext> options)
        : base(options)
    {

    }
    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);
        WorkflowEngineDbContextModelBuilderExtensions.Configure(builder);
    }
}
